<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
		<title></title>
	</head>
	<body>
		<button type="button" id="ly">弹窗分享</button>
		<script type="text/javascript" src="https://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
		<script type="text/javascript" src="plugin/layer/layer.js"></script>
		<div class="bshare-custom"><a title="分享到QQ空间" class="bshare-qzone"></a><a title="分享到新浪微博" class="bshare-sinaminiblog"></a><a title="分享到人人网" class="bshare-renren"></a><a title="分享到腾讯微博" class="bshare-qqmb"></a><a title="分享到网易微博" class="bshare-neteasemb"></a><a title="更多平台"
				class="bshare-more bshare-more-icon more-style-addthis"></a><span class="BSHARE_COUNT bshare-share-count">0</span></div>
		<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=2&amp;lang=zh"></script>
		<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#uuid=<你的UUID>&style=-1"></script>
		<!-- <script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script> -->
		<script type="text/javascript">
			// var c = '<div class="bshare-custom"><a title="分享到QQ空间" class="bshare-qzone"></a><a title="分享到新浪微博"'+
			// 	'class="bshare-sinaminiblog"></a><a title="分享到人人网" class="bshare-renren"></a><a title="分享到腾讯微博"'+
			// 	'class="bshare-qqmb"></a><a title="分享到网易微博" class="bshare-neteasemb"></a><a title="更多平台"'+
			// 	'class="bshare-more bshare-more-icon more-style-addthis"></a><span'+
			// 	'class="BSHARE_COUNT bshare-share-count">0</span></div>';
			$('#ly').on('click', function() {
				layer.open({
					type: 1,
					area: ['400px', '300px'],
					content: '<button type="button" id="wx_share">微信分享</button>',
					success(res) {
						var type = 'sinaminiblog';
						bShare.addEntry({
							title: '微信分享',
							url: 'https://max.book118.com'
						});
						$('#wx_share').on('click', function() {
							var e = event || window.event;
							console.log(e)
							if(type != "more"){
									//开始分享
									bShare.share(null, type, 0)
									return false
								}else{
									bShare.more(e);
									return false
								}
						})
					}
				})
			})
		</script>
	</body>
</html>
